#include "Precompile.h"
#include "EngineManager.h"

int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow ){
	Graphics::RenderMode mode;

	mode.anisotropylevel 	= 	1;
	mode.fullscreen 		= 	false;
	mode.multisampling 		= 	Graphics::MS_2X;
	mode.prerendercount 	= 	1;
	mode.texturefiltering 	= 	Graphics::TF_ANISOTROPIC;
	mode.vsync 				= 	1;
	mode.resolutionXY 		= 	std::pair<int,int>(1280,720);

	EngineInterfacePtr engine = Core::EngineFactory::createEngine(Core::EP_DX10);
	boost::static_pointer_cast<Core::WindowsEngineInterface>(engine)->initialize(hInstance,nCmdShow,Core::EP_DX10,mode);

	boost::shared_ptr<EngineManager> manager = boost::shared_ptr<EngineManager>(new EngineManager);
	manager->initialize(engine);
	
	engine->run();
	
	engine->finalize();
	engine.reset();
	manager.reset();
    return 0;
}